package com.example.weiji_1;

import java.util.ArrayList;

import wordroid.model.Massage;

import com.example.weiji_1.datebase.DataAccess;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.TextView;

public class Part4 extends Activity {

		protected void onCreate(Bundle savedInstanceState) {
			super.onCreate(savedInstanceState);
			requestWindowFeature(Window.FEATURE_NO_TITLE);
			setContentView(R.layout.part4);
			
			TextView view = (TextView)findViewById(R.id.textView2);
			DataAccess data = new DataAccess(this);
			final ArrayList<Massage> massageList = data.QueryMsg(null, null); 
	        view.setText(massageList.get(3).getMessage()); 
			
			Button bt1 = (Button)findViewById(R.id.button1);
			bt1.setOnClickListener(new View.OnClickListener() {
				
				@Override
				public void onClick(View arg0) {
					// TODO Auto-generated method stub
					Intent intent = new Intent();
					intent.setClass(Part4.this, Study4.class);
					Part4.this.startActivity(intent);
					
				}
			});
			
	}
}

